<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<ul>
	<li>1</li>
	<li>2</li>
	<li>3</li>
</ul>
<!--行内式-->
<input type="button" value="惦记我" onClick="javascript:alert('按钮被点击')">
<input type="button" id="btn" value="点击我">
<input type="button" id="btn2" value="取消">

</body>
</html>
<script>
var ull =document.getElementsByTagName('ul')[0];
	console.log(ull.childNodes);
	ull.removeChild(ull.childNodes[3]);
//	ull.removeAttribute('type');
//动态半丁
var btn=document.getElementById('btn');
	var btn2=document.getElementById('btn2');
	btn.onclick=function(){
		alert("按钮被点击");
	
	};
var btn=document.getElementById('btn');
	btn.onclick=function(){
		alert("按钮再次被点击");
	
	};
//监听
function f1(){
	console.log("f1");
}	
	function f2(){
	console.log("f2");
}
	function f3(){
	console.log("f3");
}
btn.addEventListener('click',f1);
	btn.addEventListener('click',f2);
	btn.addEventListener('click',f3);
/*btn.onmouseup=function(){
	alert("bdjfjksdhfjhkadjc");
}*/
	
btn2.onclick=function(){
	btn.removeEventListener('click',f2);
	btn.removeEventListener('click',f3);
	btn.removeEventListener('click',f1);
	btn.removeEventListener('btn.onclick');
}

</script>
